package com.penghaisoft.microwms.common;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;

/**
 * Created by zxcq0 on 2017/3/1.
 */
public class Constant {

    public static final SimpleDateFormat sdfYMDHMS = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static final SimpleDateFormat sdfYMD = new SimpleDateFormat("YYMMdd");

    public static final String SERIALNO = "wms:serial";
    public static final String SUCCESS = "1";
    public static final String FAIL = "0";
    public static final String NO_AUTHC = "-1";//未登录
    public static final String NO_AUTHZ = "-2";//未授权
    public static final String CODE = "code";
    public static final String MESSAGE = "message";
    public static final String TRUE = "true";
    
//    区间转换类型
    public static final int FROM_TO_DATE = 1;
    public static final int FROM_TO_NUM = 2;

    //response code
    public static final String CODE_ONE = "1";
    public static final String CODE_TWO = "2";
    public static final String CODE_THREE = "3";
    public static final String CODE_FOUR = "4";
    public static final String CODE_FIVE = "5";
    public static final String CODE_SIX = "6";
    public static final String CODE_SEVEN = "7";
    public static final String CODE_EIGHT = "8";
    public static final String CODE_NINE = "9";
    public static final String CODE_TEN = "10";
    public static final String CODE_ELEVEN = "11";
    public static final String CODE_TWELVE = "12";
    public static final String CODE_THIRTEEN = "13";
    public static final String CODE_FOURTEEN = "14";
    public static final String CODE_FIFTEEN = "15";

    public static final String RSP_LEVEL_ALERT = "alert";
    public static final String RSP_LEVEL_VALIDATE = "validate";
    public static final String RSP_LEVEL_NONE = "none";
    
    public static final String DATA_AUTH_PREFIX = "dataAuth:";
    
    public static final String DICTIONARY_DICTYPE = "dictionary:dictype:";
    
    //系统资源模块类型
    public static final String SYSTEM_DICTYPE = "cosmo_branch";
    
    /**
     * @Fields HANDKEY : 存放手持用户信息的key
     */
    public final static String HANDKEY="handUser";
    
    /**
     * 当前工厂内所有的用户
     */
    public final static String FACTORY_USER_KEY="wms:users:";
    
    /**
     * 集团用户
     */
    public final static String USER_TYPE_GROUP="1";
    /**
     * 工厂用户
     */
    public final static String USER_TYPE_FACTORY="2";

    /**
     * PE管【型号类型-原材料】
     */
    public static final String MODEL_PE = "PE";

    /**
     * 螺纹钢管【型号类型-原材料】
     */
    public static final String MODEL_L = "LW";

    /**
     * 无缝钢管【型号类型-原材料】
     */
    public static final String MODEL_W = "WF";

    /**
     * 白料【型号类型-原材料】
     */
    public static final String MODEL_B = "BL";

    /**
     * 黑料【型号类型-原材料】
     */
    public static final String MODEL_H = "HL";
    /**
     * 弯头【型号类型-原材料】
     */
    public static final String MODEL_WT = "WT";
    /**
     * 三通【型号类型-原材料】
     */
    public static final String MODEL_ST = "ST";
    /**
     * 变径【型号类型-原材料】
     */
    public static final String MODEL_BJ = "BJ";
    /**
     * 固定支架【型号类型-原材料】
     */
    public static final String MODEL_GD = "GD";

    /**
     * 默认库位
     */
    public static final String DEFAULT_WL_CODE = "A";
    
    /**
     * 成品型号类型
     */
    public static final String MODEL_TYPE_P = "model_type_p";
    
    /**
     * 手工入库前缀
     */
    public static final String PRO_HANDIN_PREFIX = "wms:handin:";
    
    /**
     * 下线入库前缀
     */
    public static final String PRO_DOWNLINEIN_PREFIX = "wms:downlinein:";
    
    /**
     * 原材料入库前缀
     */
    public static final String RAW_INWH_PREFIX = "wms:rawinwh:";

    /**
     * 销售出库前缀
     */
    public static final String PRO_SELLOUT_PREFIX = "wms:sellout:";

    /**
     * 报废出库前缀
     */
    public static final String PRO_SCRAPOUT_PREFIX = "wms:scrapout:";

    /**
     * 手持扫码失效时间
     */
    public static final int PRO_HAND_LOST_MINUTES = 3;
	/**
	 * 成品型号类型-弯头
	 */
	public static final String PRO_MODEL_TYPE_WT = "C-GUJ-W";
	/**
     * 成品型号类型-三通
     */
    public static final String PRO_MODEL_TYPE_ST = "C-GUJ-S";
    /**
     * 成品型号类型-变径
     */
    public static final String PRO_MODEL_TYPE_BJ = "C-GUJ-B";
    /**
     * 成品型号类型-固定支架
     */
    public static final String PRO_MODEL_TYPE_G = "C-GUJ-G";
    /**
     * 成品非管件入库出库时，总需求米数不超过的固定米数
     */
    public static final BigDecimal PRO_STATIC_METER = new BigDecimal(1);
    
    /**
     * 成品短前缀
     */
    public static final String SEQ_PREFIX_SHORT_REDIS = "wms:seq:proshort:";

    public static final String SEQ_PREFIX_REDIS = "wms:seq:";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_PRO_SGR = "-cpsgr";
    
    public static final String SEQ_PREFIX_SHORT_SGR = "SGR";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_PRO_XSC = "-cpxsc";
    
    public static final String SEQ_PREFIX_SHORT_TC = "TC";

    public static final String SEQ_PREFIX_SHORT_BF = "BF";

    public static final String SEQ_PREFIX_SHORT_XSC = "XSC";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_MAT_SGC = "-yclsgc";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_MAT_CSGC = "-cpsgc";
    
    public static final String SEQ_PREFIX_SHORT_SGC = "YSGC";
    
    public static final String SEQ_PREFIX_SHORT_CSGC = "CSGC";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_MAT_PD = "-yclpd";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_PRO_PD = "-cppd";
    
    public static final String SEQ_PREFIX_SHORT_PD = "PD";
    
    public static final String SEQ_PREFIX_SHORT_DJ = "DJ";
    
    public static final String SEQ_PREFIX_SHORT_REDIS_RAW_DJ = "-dj";

    /**
     * 监控地址
     */
    public static final String MONITOR_KEY = "wms:monitor";

    /**
     * 模块
     */
    public static final String MODULE_KEY = "wms:module";
    
    public static final String INIT_PWD = "123456";

    public static final BigDecimal X = new BigDecimal("0.3");

    public static final BigDecimal MIN = new BigDecimal("0.3");

    public static final BigDecimal MAX = new BigDecimal("0.35");

    public static final double min = 0.3;

    public static final double max = 0.35;
}
